1. Field of the Invention
This invention relates to a plurality of data processing systems connected by a communications link, and more particularly to the authentication and authorization of a process at one of the data processing systems for the use of a service at another one of the data processing systems.
2. Description of the Related Art
As shown in FIG. 1, a distributed networking environment 1 consists of two or more nodes A, B, C, connected through a communication link or a network 3. The network 3 can be either a local area network (LAN), or a wide area network (WAN).
At any of the nodes A, B, C, there may be a processing system 10A, 10B, 10C, such as a workstation. Each of these processing systems 10A, 10B, 10C, may be a single user system or a multi-user system with the ability to use the network 3 to access files located at a remote node. For example, the processing system 10A at local node A, is able to access the files 5B, 5C at the remote nodes B, C, respectively.
Within this document, the term "server" will be used to indicate the processing system where the file is permanently stored, and the term "client" will be used to mean any other processing system having processes accessing the file. It is to be understood, however, that the term "server" does not mean a dedicated server as that term is used in some local area network systems. The distributed services system in which the invention is implemented is truly a distributed system supporting a wide variety of applications running at different nodes in the system which may access files located anywhere in the system.
As mentioned, the invention to be described hereinafter is directed to a distributed data processing system in a communication network. In this environment, each processor at a node in the network potentially may access all the files in the network no matter at which nodes the files may reside.
Other approaches to supporting a distributed data processing system are known. For example, IBM's Distributed Services for the AIX operating system is disclosed in Ser. No. 014,897 "A System and Method for Accessing Remote Files in a Distributed Networking Environment", filed Feb. 13, 1987 in the name of Johnson et al. In addition, Sun Microsystems has released a Network File System (NFS) and Bell Laboratories has developed a Remote File System (RFS). The Sun Microsystems NFS has been described in a series of publications including S. R. Kleiman, "Vnodes: An Architecture for Multiple File System Types in Sun UNIX", Conference Proceedings, USENIX 1986 Summer Technical Conference and Exhibition, pp. 238 to 247; Russel Sandberg et al., "Design and Implementation of the Sun Network Filesystem", Conference Proceedings, Usenix 1985, pp. 119 to 130; Dan Walsh et al., "Overview of the Sun Network File System", pp. 117 to 124; JoMei Chang, "Status Monitor Provides Network Locking Service for NFS", JoMei Chang, "SunNet", pp. 71 to 75; and Bradley Taylor, "Secure Networking in the Sun Environment", pp. 28 to 36. The AT&T RFS has also been described in a series of publications including Andrew P. Rifkin et al., "RFS Architectural Overview", USENIX Conference Proceedings, Atlanta, Ga. (June 1986), pp. 1 to 12; Richard Hamilton et al., "An Administrator's View of Remote File Sharing", pp. 1 to 9; Tom Houghton et al., "File Systems Switch", pp. 1 to 2; and David J. Olander et al., "A Framework for Networking in System V", pp. 1 to 8.
One feature of the distributed services system in which the subject invention is implemented which distinguishes it from the Sun Microsystems NFS, for example, is that Sun's approach was to design what is essentially a stateless server. This means that the server does not store any information about client nodes, including such information as which client nodes have a server file open in read.sub.-- only or read.sub.-- write modes. Such an implementation simplifies the design of the server because the server does not have to deal with error recovery situations which may arise when a client fails or goes off-line without properly informing the server that it is releasing its claim on server resources.
An entirely different approach was taken in the design of the distributed service system in which the present invention is implemented. More specifically, the distributed services system may be characterized as a "stateful implementation". A "stateful" server, such as that described here, does keep information about who is using its files and how the files are being used. This requires that the server have some way to detect the loss of contact with a client so that accumulated state information about that client can be discarded. The cache management strategies described here cannot be implemented unless the server keeps such state information.
The problems encountered in accessing remote nodes can be better understood by first examining how a stand-alone system accesses files. In a stand alone system, such as 10 as shown in FIG. 2, a local buffer 12 in the operating system 11 is used to buffer the data transferred between the permanent storage 2, such as a hard file or a disk in a workstation, and the user address space 14. The local buffer 12 in the operating system 11 is also referred to as a local cache or kernel buffer.
In the stand-alone system, the kernel buffer 12 is divided into blocks 15 which are identified by device number, and logical block number within the device. When a read system call 16 is issued, it is issued with a file descriptor of the file 5 for a byte range within the file 5, as shown in step 101, FIG. 3. The operating system 11 takes this information and converts it to device number, and logical block numbers in the device, step 102, FIG. 3. If the block is in the cache, step 103, the data is obtained directly from the cache, step 105. In the case where the cache doesn't hold the sought for block at step 103, the data is read into the cache in step 104 before proceeding with step 105 where the data is obtained from the cache.
Any data read from the disk 2 is kept in the cache block 15 until the cache block 15 is needed for some purpose. Consequently, any successive read requests from an application 4 that is running on the processing system 10 for the same data previously read is accessed from the cache 12 and not the disk 2. Reading from the cache is far less time consuming than reading from the disk.
Similarly, data written from the application 4 is not saved immediately on the disk 2, but is written to the cache 12. This saves disk accesses if another write operation is issued to the same block. Modified data blocks in the cache 12 are saved on the disk 2 periodically.
Use of a cache in a stand-alone system that utilizes an AIX operating system improves the overall performance of the system since disk accessing is eliminated for successive reads and writes. Overall performance is enhanced because accessing permanent storage is slower and more expensive than accessing a cache.
In a distributed environment, as shown in FIG. 1, there are two ways the processing system 10C in local node C could read the file 5A from node A. In one way, the processing system 10C could copy the whole file 5A, and then read it as if it were a local file 5C residing at node C. Reading a file in this way creates a problem if another processing system 10A at another node A modifies the file 5A after the file 5A has been copied at node C as file 5C. The processing system 10C would not have access to these latest modifications to the file 5A.
Another way for processing system 10C to access a file 5A at node A is to read one block, e.g., N1, at a time as the processing system at node C requires it. A problem with this method is that every read has to go across the network communication link 3 to the node A where the file resides. Sending the data for every successive read is time consuming.
Accessing files across a network presents two competing problems as illustrated above. One problem involves the time required to transmit data across the network for successive reads and writes. On the other hand, if the file data is stored in the node to reduce network traffic, the file integrity may be lost. For example, if one of the several nodes is also writing to the file, the other nodes accessing the file may not be accessing the latest updated data that has just been written. As such, the file integrity is lost since a node may be accessing incorrect and outdated files.
As shown above, there is more than one node in a distributed system. Each node may try to communicate with any of the other nodes since users on one node may need to use the services of a remote node. Before the communication between the nodes can be established that will allow a user at one node to sue the resources at another node, two steps are first required: authentication and authorization.
Ser. No. 07/352,518 filed concurrently herewith on May 15, 1989 in the name of Loucks et al for "A Flexible Interface to Authentication Services In A Distributed Data Processing System", herein incorporated by reference, describes methods for authentication in which a user convinces a remote node that the use is who the user represents the user to be. Some of the methods include the use of presenting passwords. Other more complex methods include presenting a ticket that was received from a Kerberos based authentication server. Regardless of the authentication method used, once the authentication is performed, the remote machine knows who the user is. Authentication in general is an expensive operation. The authentication operation may include sending messages to the authentication server, for example to get a ticket. Therefore, it is not desirable to authenticate every message. However, if authentication is performed only once, the remote machine must remember the results of the authentication in case the same user accesses the remote machine at a later time. This causes problems for the remote server machine. For example, the remote server machine may run out of memory space, or the remote server machine may be powered down, losing the authentication information. In addition, it may be impractical for the remote machine to store this authentication information if the user does not use the remote machine again for a very long period of time. This would waste the remote machines resources a long period of time without being needed. In addition, the authentication may change over this long period of time.
Similarly, besides authentication, there is a problem of authorizing the user to utilize a service or resource of the remote machine. Once the remote machine has authenticated the user, the remote machine has to decide what level of authorization the user is to have in attempting to access the resources of the remote machine. The authorization operation is also an expensive operation.
In the AIX operating system, there are well defined authorization policies for controlling access or local resources by local users in a stand alone machine. These authorization decisions are made by these well defined security policies as described in the AIX Operating System Technical Reference, second edition, Sep. 1986, order number SV21-8009, part number 74X9990, chapter 2 under system calls open and chmod, and described in the AIX Operating System Commands Reference, First Edition, November 1985, order number SV21-8005, part number 74X9975, herein incorporated by reference, chapter 1 under commands chmod and open.
In the AIX operating system, files have owners. There is the user that owns the file, identified by a user id, and there is a group that owns a file, identified by a group id. These two ids are stored in an information structure for the file called its inode. An additional attribute of an AIX operating system file is a set of mode bits. Nine of these mode bits are used to control access to the file. These nine bits are composed of three triplets: the first triplet for the owning user of the file, the second triplet for the owning group, and the third triplet for all others. Each triplet has its first bit set if read access is allowed, its second bit set if write access is allowed, and its third bit set if execute access is allowed. Thus, a pattern of 111 101 000 means that the owning user, henceforth referred to as the owner, of the file has read, write, and execute permission for the file; the owning group, henceforth referred to as the group, has read and execute access; and all others have no access.
Users in the AIX operating system belong to a group. Furthermore, each user is a member of a concurrent group set. Users have group access to a file when the file's group is the group that the user belongs to or is one of the groups in the user's concurrent group set. Users and groups in the AIX operating system, are identified by user ids and group ids. These ids are simply integers.
The machine providing the resources has to make the determination as to the authorization level that a remote user will have to the remote machine's resources. The authorization operation is also an expensive operation. There is a problem of minimizing the authorization operation for each request and operation that is performed by a user, while still maintaining a secure distributed processing environment. In addition, users can change their level of authorization on a stand alone system, and should be able to make similar changes when dealing with a remote machine. Such a change might include a method whereby the user temporarily changes the user id of the user. Some privileged users are allowed to change their user id to a different user id. If a user id changes, the authorization for the changed user id should be different on the server. This creates a problem if the server has not been notified of the changed user id.